package com.markus.code.exam.didi;


import java.util.Scanner;

/**
 * Author:markusZhang
 * Date:Create in 2020/9/13 19:38
 * todo:
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNext()){
            int n = scanner.nextInt();
            String no = scanner.nextLine();
            String s = scanner.nextLine();
            StringBuffer sb = new StringBuffer(s);
            if (n >= sb.length()){
                System.out.println(sb.reverse());
            }else{
                StringBuffer[] sbs = new StringBuffer[(s.length()+1)/n];
                int index = 0;
                for (int i=0;i<s.length();i=i+n){
                    sbs[index++] = new StringBuffer(s.substring(i,i+n));
                }
                if (s.length() % n != 0){
                    int remain = s.length() % n;
                    sbs[index] = new StringBuffer(s.substring(s.length()-remain));
                }
                StringBuffer ans = new StringBuffer();
                for (int i=0;i<sbs.length;i++){
                    ans.append(sbs[i].reverse());
                }
                System.out.println(ans);
            }
        }
    }
}
